/*
 * circular_buffer.h
 *
 *  Created on: Aug 4, 2012
 *      Author: Eugene Parkhomenko
 */

#ifndef __MSG_QUEUE_H__
#define __MSG_QUEUE_H__

#include <sys/queue.h>

LIST_HEAD(MSG_QUEUE_HEAD, ST_STH_EVENT_MESSAGE);

typedef struct ST_STH_EVENT_MESSAGE_TAG
{
	unsigned int ulEvent;
	void *pvData;
	unsigned int ulDataSize;
	LIST_ENTRY(ST_STH_EVENT_MESSAGE) stQueue;
} ST_STH_EVENT_MESSAGE;

/* Rework to remove init function */
void *MQ_init(void);
void MQ_push(ST_MSG_QUEUE *pstQueue, ST_STH_EVENT_MESSAGE *pvMessagee);
ST_STH_EVENT_MESSAGE *MQ_pop(ST_MSG_QUEUE *pstQueue);

#endif /* __MSG_QUEUE_H__ */
